import 'package:chat_app_project/components/filled_outline_button.dart';
import 'package:chat_app_project/constants.dart';
import 'package:chat_app_project/models/Chat.dart';
import 'package:chat_app_project/screens/messages/message_screen.dart';
import 'package:chat_app_project/tool/time.dart';
import 'package:event_bus/event_bus.dart';
import 'package:flutter/material.dart';
import 'package:wukongimfluttersdk/entity/msg.dart';
import 'package:wukongimfluttersdk/model/wk_message_content.dart';
import 'package:wukongimfluttersdk/model/wk_text_content.dart';

import '../../../tool/event_bus.dart';
import 'chat_card.dart';

/// 会话列表
class Body extends StatefulWidget {
  const Body({Key? key}) : super(key: key);

  @override
  State<Body> createState() => _BodyState();
}

class _BodyState extends State<Body> {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Container(
          padding: const EdgeInsets.fromLTRB(
              kDefaultPadding, 0, kDefaultPadding, kDefaultPadding * 0.75),
          color: kPrimaryColor,
          // child: Row(
          //   children: [
          //     FillOutlineButton(press: () {}, text: 'Recent Message'),
          //     const SizedBox(width: kDefaultPadding),
          //     FillOutlineButton(
          //       press: () {},
          //       text: 'Active',
          //       isFilled: false,
          //     ),
          //   ],
          // ),
        ),
        // Expanded(
        //   child: ListView.builder(
        //     itemCount: chatsData.length,
        //     itemBuilder: ((context, index) => ChatCard(
        //           chat: chatsData[index],
        //           press: () => Navigator.push(
        //               context,
        //               MaterialPageRoute(
        //                   builder: (context) => const MessagesScreen())),
        //         )),
        //   ),
        // )
      ],
    );
  }

  @override
  void initState() {
    debugPrint('chat body init ---');
    super.initState();






  }

  @override
  void dispose() {
    super.dispose();
  }
}
